# -*- coding: utf-8 -*-


import os
import uuid
import django
from datetime import datetime
from core.initialize import Initialize
from apps.sys.models import Menu, DictType, DictData

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "application.settings")
django.setup()


class Init(Initialize):
    creator_id = uuid.uuid4()
    test_dept_id = uuid.uuid4()
    dept_belong_id = uuid.uuid4()
    superadmin_role_id = uuid.uuid4()

    def init_dict(self):
        dict_type = [
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "任务状态",
                "type": "tms_job_status",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "任务类型",
                "type": "tms_job_type",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "缺陷分类",
                "type": "tms_bug_type",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "缺陷状态",
                "type": "tms_bug_status",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "缺陷解决类型",
                "type": "tms_bug_resolved_type",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "用例类型",
                "type": "tms_tc_type",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "适用阶段",
                "type": "tms_tc_stage",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "用例执行结果",
                "type": "tms_tc_result",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "结果分析",
                "type": "tms_tc_analysis",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "用例级别",
                "type": "tms_tc_level",
                "remark": "",
            },
        ]
        dict_data = [
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_job_type",
                "sort": 1,
                "label": "手工测试",
                "value": "0",
                "tagType": "primary",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_job_type",
                "sort": 2,
                "label": "自动化测试",
                "value": "1",
                "tagType": "primary",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_job_status",
                "sort": 1,
                "label": "未执行",
                "value": "0",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_job_status",
                "sort": 2,
                "label": "初始化",
                "value": "1",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_job_status",
                "sort": 3,
                "label": "执行中",
                "value": "2",
                "tagType": "primary",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_job_status",
                "sort": 4,
                "label": "成功",
                "value": "3",
                "tagType": "success",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_job_status",
                "sort": 5,
                "label": "失败",
                "value": "4",
                "tagType": "danger",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_job_status",
                "sort": 6,
                "label": "阻塞",
                "value": "5",
                "tagType": "warning",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_job_status",
                "sort": 7,
                "label": "暂停",
                "value": "6",
                "tagType": "warning",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_job_status",
                "sort": 8,
                "label": "停止",
                "value": "7",
                "tagType": "info",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_type",
                "sort": 1,
                "label": "功能",
                "value": "0",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_type",
                "sort": 2,
                "label": "性能",
                "value": "1",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_type",
                "sort": 3,
                "label": "接口",
                "value": "2",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_type",
                "sort": 4,
                "label": "安全",
                "value": "3",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_type",
                "sort": 5,
                "label": "体验",
                "value": "4",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_type",
                "sort": 6,
                "label": "配置",
                "value": "5",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_type",
                "sort": 7,
                "label": "部署",
                "value": "6",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_type",
                "sort": 8,
                "label": "设计",
                "value": "7",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_type",
                "sort": 9,
                "label": "其他",
                "value": "8",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_status",
                "sort": 1,
                "label": "新建",
                "value": "new",
                "tagType": "primary",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_status",
                "sort": 2,
                "label": "已激活",
                "value": "activated",
                "tagType": "success",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_status",
                "sort": 3,
                "label": "已解决",
                "value": "resolved",
                "tagType": "warning",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_status",
                "sort": 4,
                "label": "已关闭",
                "value": "closed",
                "tagType": "info",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_status",
                "sort": 5,
                "label": "已挂起",
                "value": "pending",
                "tagType": "danger",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_status",
                "sort": 6,
                "label": "重新激活",
                "value": "reactivated",
                "tagType": "success",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_resolved_type",
                "sort": 1,
                "label": "已解决",
                "value": "0",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_resolved_type",
                "sort": 2,
                "label": "设计如此",
                "value": "1",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_resolved_type",
                "sort": 3,
                "label": "重复提交",
                "value": "2",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_resolved_type",
                "sort": 4,
                "label": "无法重现",
                "value": "3",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_resolved_type",
                "sort": 5,
                "label": "延期处理",
                "value": "4",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_resolved_type",
                "sort": 6,
                "label": "外部原因",
                "value": "5",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_bug_resolved_type",
                "sort": 7,
                "label": "不予解决",
                "value": "6",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_type",
                "sort": 1,
                "label": "界面测试",
                "value": "0",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_type",
                "sort": 2,
                "label": "接口测试",
                "value": "1",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_type",
                "sort": 3,
                "label": "协议测试",
                "value": "2",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_type",
                "sort": 4,
                "label": "安装卸载",
                "value": "3",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_type",
                "sort": 5,
                "label": "配置测试",
                "value": "4",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_type",
                "sort": 6,
                "label": "功能测试",
                "value": "5",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_type",
                "sort": 7,
                "label": "性能测试",
                "value": "6",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_type",
                "sort": 8,
                "label": "文档测试",
                "value": "7",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_type",
                "sort": 9,
                "label": "安全性测试",
                "value": "8",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_type",
                "sort": 10,
                "label": "兼容性测试",
                "value": "9",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_stage",
                "sort": 1,
                "label": "冒烟测试阶段",
                "value": "0",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_stage",
                "sort": 2,
                "label": "单元测试阶段",
                "value": "1",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_stage",
                "sort": 3,
                "label": "功能测试阶段",
                "value": "2",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_stage",
                "sort": 4,
                "label": "集成测试阶段",
                "value": "3",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_stage",
                "sort": 5,
                "label": "系统测试阶段",
                "value": "4",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_stage",
                "sort": 6,
                "label": "版本验证阶段",
                "value": "5",
                "tagType": "default",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_result",
                "sort": 1,
                "label": "通过",
                "value": "0",
                "tagType": "success",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_result",
                "sort": 2,
                "label": "失败",
                "value": "1",
                "tagType": "danger",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_result",
                "sort": 3,
                "label": "阻塞",
                "value": "2",
                "tagType": "warning",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_result",
                "sort": 4,
                "label": "忽略",
                "value": "3",
                "tagType": "info",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_analysis",
                "sort": 1,
                "label": "待分析",
                "value": "0",
                "tagType": "primary",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_analysis",
                "sort": 2,
                "label": "环境问题",
                "value": "1",
                "tagType": "warning",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_analysis",
                "sort": 3,
                "label": "用例问题",
                "value": "2",
                "tagType": "warning",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_analysis",
                "sort": 4,
                "label": "脚本问题",
                "value": "3",
                "tagType": "warning",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_analysis",
                "sort": 5,
                "label": "产品缺陷",
                "value": "4",
                "tagType": "danger",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_level",
                "sort": 1,
                "label": "L1",
                "value": "0",
                "tagType": "danger",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_level",
                "sort": 2,
                "label": "L2",
                "value": "1",
                "tagType": "warning",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_level",
                "sort": 3,
                "label": "L3",
                "value": "2",
                "tagType": "primary",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_level",
                "sort": 4,
                "label": "L4",
                "value": "3",
                "tagType": "success",
                "tagClass": "",
                "remark": "",
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "default": True,
                "id": uuid.uuid4(),
                "type": "tms_tc_level",
                "sort": 5,
                "label": "L5",
                "value": "4",
                "tagType": "info",
                "tagClass": "",
                "remark": "",
            },
        ]
        self.save(DictType, dict_type, "字典类型")
        self.save(DictData, dict_data, "字典数据")

    def init_menu(self):
        """
        初始化菜单表-测试管理
        """
        tms = uuid.uuid4()
        tms_testplan = uuid.uuid4()
        tms_testdesign = uuid.uuid4()
        tms_job = uuid.uuid4()
        tms_testcase = uuid.uuid4()
        tms_bug = uuid.uuid4()
        tms_testreport = uuid.uuid4()

        self.menu_tms_data = [
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": tms,
                "name": "测试管理",
                "type": "M",
                "icon": "test",
                "path": "/tms",
                "component": "Layout",
                "perms": None,
                "nesting": True,
                "redirect": "noRedirect",
                "parent_id": None,
                "sort": 3,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": tms_testplan,
                "name": "测试计划",
                "type": "C",
                "icon": "testplan",
                "path": "testplan",
                "component": "tms/testplan/index",
                "perms": "tms:testplan:list",
                "parent_id": tms,
                "sort": 1,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "计划查询",
                "type": "F",
                "icon": "#",
                "perms": "tms:testplan:query",
                "parent_id": tms_testplan,
                "sort": 1,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "计划新增",
                "type": "F",
                "icon": "#",
                "perms": "tms:testplan:add",
                "parent_id": tms_testplan,
                "sort": 2,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "计划修改",
                "type": "F",
                "icon": "#",
                "perms": "tms:testplan:edit",
                "parent_id": tms_testplan,
                "sort": 3,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "计划删除",
                "type": "F",
                "icon": "#",
                "perms": "tms:testplan:delete",
                "parent_id": tms_testplan,
                "sort": 4,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "计划导入",
                "type": "F",
                "icon": "#",
                "perms": "tms:testplan:import",
                "parent_id": tms_testplan,
                "sort": 5,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "计划导出",
                "type": "F",
                "icon": "#",
                "perms": "tms:testplan:export",
                "parent_id": tms_testplan,
                "sort": 6,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "添加需求",
                "type": "F",
                "icon": "#",
                "perms": "tms:testplan:addReq",
                "parent_id": tms_testplan,
                "sort": 7,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "添加用例",
                "type": "F",
                "icon": "#",
                "perms": "tms:testplan:addCase",
                "parent_id": tms_testplan,
                "sort": 8,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "生成报告",
                "type": "F",
                "icon": "#",
                "perms": "tms:testplan:genReport",
                "parent_id": tms_testplan,
                "sort": 8,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": tms_testdesign,
                "name": "测试设计",
                "type": "C",
                "icon": "testdesign",
                "path": "testdesign",
                "component": "tms/testdesign/index",
                "perms": "tms:testdesign:list",
                "parent_id": tms,
                "sort": 2,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "设计查询",
                "type": "F",
                "icon": "#",
                "perms": "tms:testdesign:query",
                "parent_id": tms_testdesign,
                "sort": 1,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "设计新增",
                "type": "F",
                "icon": "#",
                "perms": "tms:testdesign:add",
                "parent_id": tms_testdesign,
                "sort": 2,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "设计修改",
                "type": "F",
                "icon": "#",
                "perms": "tms:testdesign:edit",
                "parent_id": tms_testdesign,
                "sort": 3,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "设计删除",
                "type": "F",
                "icon": "#",
                "perms": "tms:testdesign:delete",
                "parent_id": tms_testdesign,
                "sort": 4,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "设计导入",
                "type": "F",
                "icon": "#",
                "perms": "tms:testdesign:import",
                "parent_id": tms_testdesign,
                "sort": 5,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "设计导出",
                "type": "F",
                "icon": "#",
                "perms": "tms:testdesign:export",
                "parent_id": tms_testdesign,
                "sort": 6,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "设计保存",
                "type": "F",
                "icon": "#",
                "perms": "tms:testdesign:save",
                "parent_id": tms_testdesign,
                "sort": 7,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": tms_testcase,
                "name": "测试用例",
                "type": "C",
                "icon": "testcase",
                "path": "testcase",
                "component": "tms/testcase/index",
                "perms": "tms:testcase:list",
                "parent_id": tms,
                "sort": 3,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "用例查询",
                "type": "F",
                "icon": "#",
                "perms": "tms:testcase:query",
                "parent_id": tms_testcase,
                "sort": 1,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "用例新增",
                "type": "F",
                "icon": "#",
                "perms": "tms:testcase:add",
                "parent_id": tms_testcase,
                "sort": 2,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "用例修改",
                "type": "F",
                "icon": "#",
                "perms": "tms:testcase:edit",
                "parent_id": tms_testcase,
                "sort": 3,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "用例删除",
                "type": "F",
                "icon": "#",
                "perms": "tms:testcase:delete",
                "parent_id": tms_testcase,
                "sort": 4,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "用例导入",
                "type": "F",
                "icon": "#",
                "perms": "tms:testcase:import",
                "parent_id": tms_testcase,
                "sort": 5,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "用例导出",
                "type": "F",
                "icon": "#",
                "perms": "tms:testcase:export",
                "parent_id": tms_testcase,
                "sort": 6,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "用例复制",
                "type": "F",
                "icon": "#",
                "perms": "tms:testcase:copy",
                "parent_id": tms_testcase,
                "sort": 7,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": tms_job,
                "name": "测试执行",
                "type": "C",
                "icon": "job",
                "path": "job",
                "component": "tms/job/index",
                "perms": "tms:job:list",
                "parent_id": tms,
                "sort": 4,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "任务查询",
                "type": "F",
                "icon": "#",
                "perms": "tms:job:query",
                "parent_id": tms_job,
                "sort": 1,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "任务新增",
                "type": "F",
                "icon": "#",
                "perms": "tms:job:add",
                "parent_id": tms_job,
                "sort": 2,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "任务修改",
                "type": "F",
                "icon": "#",
                "perms": "tms:job:edit",
                "parent_id": tms_job,
                "sort": 3,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "任务删除",
                "type": "F",
                "icon": "#",
                "perms": "tms:job:delete",
                "parent_id": tms_job,
                "sort": 4,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "任务导入",
                "type": "F",
                "icon": "#",
                "perms": "tms:job:import",
                "parent_id": tms_job,
                "sort": 5,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "任务导出",
                "type": "F",
                "icon": "#",
                "perms": "tms:job:export",
                "parent_id": tms_job,
                "sort": 6,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "任务执行",
                "type": "F",
                "icon": "#",
                "perms": "tms:job:start",
                "parent_id": tms_job,
                "sort": 7,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "任务停止",
                "type": "F",
                "icon": "#",
                "perms": "tms:job:stop",
                "parent_id": tms_job,
                "sort": 8,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "任务暂停",
                "type": "F",
                "icon": "#",
                "perms": "tms:job:pause",
                "parent_id": tms_job,
                "sort": 9,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "任务恢复",
                "type": "F",
                "icon": "#",
                "perms": "tms:job:resume",
                "parent_id": tms_job,
                "sort": 10,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "执行日志",
                "type": "F",
                "icon": "#",
                "perms": "tms:job:log",
                "parent_id": tms_job,
                "sort": 11,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "插件预览",
                "type": "F",
                "icon": "#",
                "perms": "tms:jobPlugins:view",
                "parent_id": tms_job,
                "sort": 12,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "插件上传",
                "type": "F",
                "icon": "#",
                "perms": "tms:jobPlugins:upload",
                "parent_id": tms_job,
                "sort": 13,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "插件下载",
                "type": "F",
                "icon": "#",
                "perms": "tms:jobPlugins:download",
                "parent_id": tms_job,
                "sort": 14,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "插件删除",
                "type": "F",
                "icon": "#",
                "perms": "tms:jobPlugins:delete",
                "parent_id": tms_job,
                "sort": 15,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": tms_bug,
                "name": "产品缺陷",
                "type": "C",
                "icon": "bug",
                "path": "bug",
                "component": "tms/bug/index",
                "perms": "tms:bug:list",
                "parent_id": tms,
                "sort": 5,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "缺陷查询",
                "type": "F",
                "icon": "#",
                "perms": "tms:bug:query",
                "parent_id": tms_bug,
                "sort": 1,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "缺陷新增",
                "type": "F",
                "icon": "#",
                "perms": "tms:bug:add",
                "parent_id": tms_bug,
                "sort": 2,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "缺陷修改",
                "type": "F",
                "icon": "#",
                "perms": "tms:bug:edit",
                "parent_id": tms_bug,
                "sort": 3,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "缺陷删除",
                "type": "F",
                "icon": "#",
                "perms": "tms:bug:delete",
                "parent_id": tms_bug,
                "sort": 4,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "缺陷导入",
                "type": "F",
                "icon": "#",
                "perms": "tms:bug:import",
                "parent_id": tms_bug,
                "sort": 5,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "缺陷导出",
                "type": "F",
                "icon": "#",
                "perms": "tms:bug:export",
                "parent_id": tms_bug,
                "sort": 6,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "缺陷激活",
                "type": "F",
                "icon": "#",
                "perms": "tms:bug:activated",
                "parent_id": tms_bug,
                "sort": 7,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "缺陷解决",
                "type": "F",
                "icon": "#",
                "perms": "tms:bug:resolved",
                "parent_id": tms_bug,
                "sort": 8,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "缺陷关闭",
                "type": "F",
                "icon": "#",
                "perms": "tms:bug:closed",
                "parent_id": tms_bug,
                "sort": 9,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "缺陷挂起",
                "type": "F",
                "icon": "#",
                "perms": "tms:bug:pending",
                "parent_id": tms_bug,
                "sort": 10,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": tms_testreport,
                "name": "测试报告",
                "type": "C",
                "icon": "testreport",
                "path": "testreport",
                "component": "tms/testreport/index",
                "perms": "tms:testreport:list",
                "parent_id": tms,
                "sort": 6,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "报告查询",
                "type": "F",
                "icon": "#",
                "perms": "tms:testreport:query",
                "parent_id": tms_testreport,
                "sort": 1,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "报告新增",
                "type": "F",
                "icon": "#",
                "perms": "tms:testreport:add",
                "parent_id": tms_testreport,
                "sort": 2,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "报告修改",
                "type": "F",
                "icon": "#",
                "perms": "tms:testreport:edit",
                "parent_id": tms_testreport,
                "sort": 3,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "报告删除",
                "type": "F",
                "icon": "#",
                "perms": "tms:testreport:delete",
                "parent_id": tms_testreport,
                "sort": 4,
            },
            {
                "dept_belong_id": self.dept_belong_id,
                "update_time": datetime.now(),
                "create_time": datetime.now(),
                "creator_id": self.creator_id,
                "id": uuid.uuid4(),
                "name": "报告下载",
                "type": "F",
                "icon": "#",
                "perms": "tms:testreport:download",
                "parent_id": tms_testreport,
                "sort": 5,
            },
        ]
        self.save(Menu, self.menu_tms_data, "菜单表")

    def run(self):
        self.init_dict()
        self.init_menu()


def main(reset=False):
    Init(reset).run()
    pass


if __name__ == "__main__":
    main()
